package com.shisfish.service;

import com.shisfish.domain.Test;
import com.shisfish.domain.generator.TestGenerator;
import com.shisfish.utils.ResultUtil;
import com.shisfish.vo.ResultVO;
import org.springframework.stereotype.Service;

/**
 * @author shisfish
 * @date 2020/1/17
 */
@Service
public class TestService {

    public ResultVO save(Test test) {
        return ResultUtil.success(TestGenerator.save(test));
    }

    public ResultVO del(Integer id) {
        return ResultUtil.success();
    }

    public ResultVO update(Test test) {
        return ResultUtil.success(TestGenerator.update(test));
    }

    public ResultVO findAll() {
        return ResultUtil.success(TestGenerator.findAll());
    }

    public ResultVO findById(Integer id) {
        return ResultUtil.success(TestGenerator.findById(id));
    }
    
}
